package top.zuli.package02.homework06;

public class Demo4 {
    int i;
    int sum;
    void print(){
        if (i<100){
            i++;
            sum += i;
            print();
        }
    }
    public static void main(String[] args) {
        Demo4 demo = new Demo4();
        demo.print();
        System.out.println(demo.sum);
    }
}
